﻿@model IEnumerable<MvcShopping.Models.Log>
@{Layout = null;}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Thirteen Shop</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />

    <link rel="stylesheet" href="~/tpl/static/css/bootstrap.min.css" type="text/css" media="all" />
    <link rel="stylesheet" href="~/tpl/static/css/jquery-ui.min.css" type="text/css" media="all" />
    <link rel="stylesheet" href="~/tpl/Admin/common/css/admin.css" type="text/css" />
    <link href="~/Content/alert.css" rel="stylesheet" />

    <style>
        #Url {
            display: none;
        }

        .black {
            color: black;
        }
    </style>
    <script type="text/javascript" src="~/tpl/static/js/jquery-1.9.1.min.js"></script>
    <script src="~/Scripts/alert.js"></script>
    <script type="text/javascript" src="~/tpl/static/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="~/tpl/static/js/jquery.artDialog.js?skin=aero"></script>
    <script type="text/javascript" src="~/tpl/static/js/iframeTools.js"></script>
    <script type="text/javascript" src="~/tpl/static/js/jquery.form.min.js"></script>
    <script type="text/javascript" src="~/tpl/static/js/jquery.validate.min.js"></script>
    <script language="javascript" src="~/tpl/static/js/jquery.imagePreview.js"></script>
    <script type="text/javascript" src="~/tpl/static/js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="~/tpl/static/js/datepicker.js"></script>
    <script type="text/javascript" src="~/tpl/Admin/common/js/common.js"></script>
    <script src="~/Scripts/jquery.unobtrusive-ajax.js"></script>
</head>


<body>
    <!--顶部-->
    <nav class="navbar navbar-inverse">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="~/Home/index">Thirteen Shop后台管理</a>
            </div>

            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <a href="~/Home/index" target="_blank"><i class="glyphicon glyphicon-home"></i> 网站首页</a>
                    </li>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="glyphicon glyphicon-user"></i> 超级管理员【admin】 <span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            
                            <li>
                                <a href="~/Home/index">退出</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>
    <!--顶部结束-->
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-2">
                <div id="nav">
                    <p id="p_home"><i class="glyphicon glyphicon-home"></i> 首页</p>
                    <p id="p_article"><i class="glyphicon glyphicon-list-alt"></i> 商品管理</p>
                    <div class="menu_body" id="b_article">
                        <li>
                            <a href="~/Admin/Add"><i class="glyphicon glyphicon-menu-right"></i> 添加商品</a>
                        </li>
                        <li>
                            <a href="~/Admin/index"><i class="glyphicon glyphicon-menu-right"></i> 商品列表</a>
                        </li>
                    </div>

                    <p id="p_user"><i class="glyphicon glyphicon-user"></i> 用户管理</p>
                    <div class="menu_body" id="b_user">
                        <li>
                            <a href="~/AdminMember/Add"><i class="glyphicon glyphicon-menu-right"></i> 添加用户</a>
                        </li>
                        <li>
                            <a href="~/AdminMember/index"><i class="glyphicon glyphicon-menu-right"></i> 用户列表</a>
                        </li>
                        <li>
                            <a href="~/AdminRegister/addMember"><i class="glyphicon glyphicon-menu-right"></i> 新增管理员</a>
                        </li>
                    </div>
                    <p id="p_sys"><i class="glyphicon glyphicon-cog"></i> 订单管理</p>
                    <div class="menu_body" id="b_sys">
                        <li>
                            <a href="~/Admin/AdminOrder">查看订单</a>
                        </li>

                    </div>
                    <p id="p_sys"><i class="glyphicon glyphicon-adjust"></i> 类别管理</p>
                    <div class="menu_body" id="b_sys">
                        <li>

                            <a href="~/ProductCategories/Create">查看与添加</a>
                        </li>

                    </div>
                    <p id="p_sys"><i class="glyphicon glyphicon-cog"></i> 日志管理</p>
                    <div class="menu_body" id="b_sys">
                        <li>
                            <a href="~/Logs/Index">查看日志</a>
                        </li>

                    </div>
                </div>
            </div>

            <div class="col-md-10">

                <script type="text/javascript">
                    $(document).ready(function () {
                        $(".preview").preview();
                    });

                    function jumpUrl() {
                        v = document.getElementById("path").options[document.getElementById("path").selectedIndex].value;
                        url = "/index.php?g=admin&m=article&a=index&path=" + v;
                        window.location.href = url;
                    }
                </script>

                <ol class="breadcrumb">
                    <li>
                        <a href="javascript:;">日志管理</a>
                    </li>
                    <li class="active">查看日志</li>
                </ol>
                <table class="table">
                    <tr>
                        <th>序号</th>
                        <th>
                            操作用户
                        </th>
                        <th>
                            操作详情
                        </th>
                        <th>日志管理相关操作</th>
                    </tr>

                    @foreach (var item in Model)
                    {
                        <tr class="trFather">
                            <td>@Html.DisplayFor(modelItem => item.Id)</td>
                            <td>
                                @Html.DisplayFor(modelItem => item.operateName)
                            </td>
                            <td>
                                @Html.DisplayFor(modelItem => item.operateContent)
                            </td>
                            <td>
                                @*@Html.ActionLink("修改", "Edit", new { id = item.Id }, new { @class = "btn btn-warning btn-sm" } )*@ 
                                <span style="width:30px;display:inline-block"></span>
                                <a href="javascript:;" class="btn btn-danger btn-sm deleteGood" data-id="@item.Id">删除</a>
                                
                            </td>
                        </tr>
                    }

                </table>

                
                <script type="text/javascript">
                    $("#path").val("");
                </script>

                <input type="hidden" id="menu_action" value="article" />
            </div>
        </div>

    </div>

    <script type="text/javascript">
                    var M = {

                    }
                   

                    $(".deleteGood").each(function (index, value) {
                        $(this).click(function () {


                        var getid = parseInt($(this).attr('data-id'));
                        var a = index;
                        
                        M.dialog7 = jqueryAlert({
                            'style': 'pc',
                            'title': '确认删除吗？',
                            'modal': true,
                            'contentTextAlign': 'left',
                            'width': '500',
                            'height': '400',
                            'animateType': 'linear',
                            'buttons': {
                                '确定': function () {

                                    $.ajax({
                                        url: 'Deletea',
                                        data: { id: getid },
                                        success: function () {
                                            $(".trFather").eq(a).remove();
                                            M.dialog7.close();
                                            if (M.dialog51) {
                                                return M.dialog51.show();
                                            }
                                            M.dialog51 = jqueryAlert({
                                                'content': '删除成功'
                                            })
                                        },
                                        error: function () {
                                            alert("服务器连接异常");
                                            M.dialog7.close();
                                        }
                                    });

                                },
                                '取消': function () {
                                    M.dialog7.close();
                                    if (M.dialog51) {
                                        return M.dialog51.show();
                                    }
                                    M.dialog51 = jqueryAlert({
                                        'content': '删除失败'
                                    })
                                }
                            }
                        });
                        //$.ajax({
                        //    url: "changeToAsp",
                        //    data: { Content: getid},
                        //    cache: false,
                        //    type: 'post',
                        //    datatype;"json",
                        //    success: function (data) {
                        //       // alert(data);

                        //    },
                        //    error: function (data) {
                        //        alert("服务器连接异常");
                        //    }
                        //});
                        });
                    });
                   
                    $(document).ready(function () {


                        //幻灯片元素与类“menu_body”段与类“menu_head”时点击
                        var menu_action = $("#menu_action").val();
                        $("#p_" + menu_action).addClass("select");
                        $("#b_" + menu_action).show().addClass("local");

                        $("#nav p").click(function () {
                            $(this).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
                            $("#nav p").removeClass("select");
                            $(this).addClass("select");
                            $(this).next("div.menu_body").addClass("local");
                        });

                        $("#picname_src").click(function () {
                            $("#picname").click();
                            $("#Url").val($("#picname").val());
                        })
                    });
    </script>

</body>

</html>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}




